<template>
  <el-config-provider :locale="locale">
    <router-view />
  </el-config-provider>
</template>

<script setup>
import { computed, onMounted, watch } from 'vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import en from 'element-plus/es/locale/lang/en'
import { useStore } from 'vuex'
import dayjs from 'dayjs'
import { ElMessage } from 'element-plus'

const store = useStore()
const locale = computed(() => (store.getters.lang === 'zh' ? zhCn : en))

const settingTime = dayjs()
  .startOf('date')
  .startOf('hour')
  .add(17, 'hours')
  .format('YYYY-MM-DD HH:mm:ss')
</script>

<style lang="scss" scoped></style>
